#define  _CRT_SECURE_NO_WARNINGS 1

#include "list.h"

void TestList1()
{
	zzh::list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(33);
	lt1.push_back(24);
	lt1.push_back(5);
	lt1.push_back(6);
	lt1.push_back(87);
	lt1.push_back(6);
	lt1.push_back(96);
	lt1.push_back(6);
	lt1.push_back(64);
	lt1.push_back(655);
	zzh::print_container(lt1);

	lt1.pop_back();
	lt1.pop_front();
	zzh::print_container(lt1);

	lt1.insert(lt1.begin(), 20);
	lt1.insert(lt1.begin()++, 20);
	lt1.insert(lt1.end(), 20);
	zzh::print_container(lt1);

	lt1.erase(lt1.begin());
	lt1.erase(--lt1.end());
	zzh::print_container(lt1);

	zzh::list<int>::iterator it = lt1.begin();
	while (it != lt1.end())
	{
		if (*it % 2 == 0)
		{
			it = lt1.erase(it);
		}
		else
		{
			++it;
		}
	}
	zzh::print_container(lt1);

}

int main()
{
	TestList1();

	return 0;
}